package sng.utils
{
	public class TimeUtil
	{
		public static function getTimeStringFromSecond(s:Number):String
		{
			var str:String = "";
			var minutes:uint = Math.floor(s/60);
			var seconds:uint = s - minutes*60;
			var hours:uint = Math.floor(minutes/60);
			minutes = minutes - hours*60;
			
			if(hours<10)
			{
				str += "0"
			}
			str += hours.toString()+":";
			if(minutes<10)
			{
				str += "0"
			}
			str += minutes.toString()+":";
			if(seconds<10)
			{
				str += "0"
			}
			str += seconds.toString();
			
			return str;
		}
		
		public static function getTimeSecond():Number
		{
			return Math.floor(new Date().time/1000);
		}
	}
}